<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>按键修饰符</title>
</head>
<body>
    <div id="app"> 
        <input type="text" @keyup.enter="getAll"/>
         <input type="button" value="查询" @click="getAll"/>
    </div>

    <script>
        var vue= new  Vue({
            
            el:"#app",
            data:{
                num:1
            },
            methods:{
                getAll(){
                    alert("getAll");
                }
                
            }
        })
    </script>
</body>
</html>